package algorithms.roughgarden.part2.dynamicprogramming.allpair;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

class Vertex {
	
	private int vertexNumber;
	private List<Edge> outgoingEdges = new ArrayList<Edge>();
	private List<Edge> incomingEdges = new ArrayList<Edge>();
	
	public Vertex(int vertexNumber){
		this.vertexNumber = vertexNumber;
	}
	
	public int getVertexNumber(){
		return vertexNumber;
	}
	void addOutgoingEdge(Edge edge){
		outgoingEdges.add(edge);
	}
	
	void addIncomingEdge(Edge edge){
		incomingEdges.add(edge);
	}
	
	public List<Edge> getIncomingEdges(){
		return Collections.unmodifiableList(incomingEdges);
	}

}
